<template>
  <div class="all" ref="ActiveYear7">

    <div class="bg" v-if="reportSeventhJson">
      <LImage class="img-bg" :src="Config.img('2201_bg.png')"></LImage>
      <div class="allab">
        <LImage class="img-stars" :src="Config.img('2201_stars.png')"></LImage>
      </div>
      <LImage class="img-moon" :src="Config.img('2201_moon.png')"></LImage>
      <LImage class="img-spot-right" :src="Config.img('2201_right_spot.png')"></LImage>
      <LImage class="img-log" :src="Config.img('2201_page7_logo.png')"></LImage>
      <LImage class="img-spot-left" :src="Config.img('2201_left_spot.png')"></LImage>
      
      <div class="height120"></div>
      <text class="font30 text1">{{'这一年，你生活规律，总喜欢在'+timed[reportSeventhJson.timeType]+'开单'}}</text>
      
      <div class="height40"></div>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font30 text-yellow">{{'“醒醒，起来接盘了”'}}</span>
        <span class="font30 text1">{{'是你最爱的闹钟铃声'}}</span>
      </richtext>

      <div class="height40"></div>
      <richtext class="richtext" :style="{'background-color':stylek}">
        <span class="font30 text1">{{'很高兴Vtrading今年帮你交易了'}}</span>
        <span class="font52 text-yellow">{{reportSeventhJson.orderCount}}</span>
        <span class="font30 text1">{{'次'}}</span>
      </richtext>

      <div class="height40"></div>
      <text class="font30 text-yellow">{{'希望你今晚依然睡个安稳觉'}}</text>


      <div class="all"></div>
      <div class="but" @stopPropagation="stopPropagation" @click="otClick"></div>
    </div>
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
  .richtext {
    background-color:rgba(0, 0, 0, 0)
  }
  .yinyue {
    position: absolute;
    right: 40;
    top: 40;
    width: 60px;
    height: 60px;
  }
  .text1 {
    color: #E5F3FF;
  }
  .bg {
    flex: 1;
    padding-left: 70px;
    padding-right: 70px;
  }
  .allab {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
  }
  .img-bg {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
  }
  .img-stars {
    width: 719px;
    height: 766px;
  }
  .img-moon {
    position: absolute;
    top: 100;
    right: -130px;
    width: 260px;
    height: 260px;
  }
  .img-spot-left {
    position: absolute;
    bottom: 380;
    left: 10;

    width: 88px;
    height: 93px;
  }
  .img-spot-right {
    position: absolute;
    bottom: 288;
    right: 0;
    
    width: 147px;
    height: 155px;
  }
  .img-log {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 750px;
    height: 760px;
  }

  .img-text {
    width: 296px;
    height: 119px;
    margin-top: 40px;
  }
  .but {
    height: 160px;
  }
  .height120 {
    height: 120px;
  }
  .mb40 {
    margin-bottom: 40px;
  }
  .text-yellow {
    color: #F6CF54;
  }
</style>

<script>

//功能
import jconfig from "@/_js/config"; 

export default {

  props:{
    data:{
      type:Object,
      default:undefined,
    },
  },
  
  data() {
    return {
      Config: jconfig,
      data:undefined,
      reportSeventhJson:undefined,
      timed:{ '0':'晚上', '1':'早上', '2':'午间',},
    }
  },

  /* reportSeventhJson 7
    * 
    *   orderCount 开单数量
    *   timeType 开单时间类型 0早上 1午间 2晚上
    *   "reportSeventhJson":{
            "orderCount":58,
            "timeType":"0"
        },
    **/
  mounted(){
    var reportSeventhJson = this.data.reportSeventhJson;
    this.reportSeventhJson = reportSeventhJson;
    setTimeout(() => {
      this.stylek = 'rgba(0, 0, 0, 0)';
      this.$forceUpdate();
    }, 1000);
  },

  methods:{
    /******************** 点击*/
    
    /******************** 手势*/
    stopPropagation(){
      return true;
    },

    /******************** 按钮*/
    //查看
    otClick() {
      this.$emit("ot", this.$refs.ActiveYear7, 8);
    },
  }
}
</script>
